package com.ruoyi.contracts.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 合同管理对象 contracts
 * 
 * @author suoge
 * @date 2025-10-21
 */
public class Contracts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 合同ID */
    private Long contractId;

    /** 关联商机ID（可空） */
    @Excel(name = "关联商机ID", readConverterExp = "可=空")
    private Long opportunityId;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String contractNo;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerName;

    /** 合同名称 */
    @Excel(name = "合同名称")
    private String contractName;

    /** 合同金额 */
    @Excel(name = "合同金额")
    private BigDecimal contractAmount;

    /** 签订日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签订日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signDate;

    /** 合同开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startDate;

    /** 合同结束日期（如服务类） */
    @Excel(name = "合同结束日期", readConverterExp = "如=服务类")
    private Date endDate;

    /** 付款条款 */
    @Excel(name = "付款条款")
    private String paymentTerms;

    /** 合同状态：草稿、已签订、生效中、已终止、已归档 */
    @Excel(name = "合同状态：草稿、已签订、生效中、已终止、已归档")
    private String contractStatus;

    /** 负责人 */
    @Excel(name = "负责人")
    private String responsiblePerson;

    public void setContractId(Long contractId) 
    {
        this.contractId = contractId;
    }

    public Long getContractId() 
    {
        return contractId;
    }

    public void setOpportunityId(Long opportunityId) 
    {
        this.opportunityId = opportunityId;
    }

    public Long getOpportunityId() 
    {
        return opportunityId;
    }

    public void setContractNo(String contractNo) 
    {
        this.contractNo = contractNo;
    }

    public String getContractNo() 
    {
        return contractNo;
    }

    public void setCustomerName(String customerName) 
    {
        this.customerName = customerName;
    }

    public String getCustomerName() 
    {
        return customerName;
    }

    public void setContractName(String contractName) 
    {
        this.contractName = contractName;
    }

    public String getContractName() 
    {
        return contractName;
    }

    public void setContractAmount(BigDecimal contractAmount) 
    {
        this.contractAmount = contractAmount;
    }

    public BigDecimal getContractAmount() 
    {
        return contractAmount;
    }

    public void setSignDate(Date signDate) 
    {
        this.signDate = signDate;
    }

    public Date getSignDate() 
    {
        return signDate;
    }

    public void setStartDate(Date startDate) 
    {
        this.startDate = startDate;
    }

    public Date getStartDate() 
    {
        return startDate;
    }

    public void setEndDate(Date endDate) 
    {
        this.endDate = endDate;
    }

    public Date getEndDate() 
    {
        return endDate;
    }

    public void setPaymentTerms(String paymentTerms) 
    {
        this.paymentTerms = paymentTerms;
    }

    public String getPaymentTerms() 
    {
        return paymentTerms;
    }

    public void setContractStatus(String contractStatus) 
    {
        this.contractStatus = contractStatus;
    }

    public String getContractStatus() 
    {
        return contractStatus;
    }

    public void setResponsiblePerson(String responsiblePerson) 
    {
        this.responsiblePerson = responsiblePerson;
    }

    public String getResponsiblePerson() 
    {
        return responsiblePerson;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("contractId", getContractId())
            .append("opportunityId", getOpportunityId())
            .append("contractNo", getContractNo())
            .append("customerName", getCustomerName())
            .append("contractName", getContractName())
            .append("contractAmount", getContractAmount())
            .append("signDate", getSignDate())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("paymentTerms", getPaymentTerms())
            .append("contractStatus", getContractStatus())
            .append("responsiblePerson", getResponsiblePerson())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
